package com.wjyf.reducing_bento.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * <p>
 * 订单表
 * </p>
 *
 * @author wjyf
 * @since 2023-03-14 08:36:33
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("tb_indent")
@ApiModel(value = "IndentBean对象", description = "订单表")
public class IndentBean extends Model<IndentBean> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("订单id")
    @TableId(value = "in_id", type = IdType.AUTO)
    private Integer inId;

    @ApiModelProperty("用户id")
    @TableField("u_id")
    private Long uId;

    @ApiModelProperty("用户电话")
    @TableField("u_phon")
    private String uPhon;

    @ApiModelProperty("订单状态(0：未付款，1：已付款，2：已完成，3：已取消)")
    @TableField("in_flag")
    private String inFlag;

    @ApiModelProperty("商品id与数量信息")
    @TableField("cod_all")
    private String codAll;

    @ApiModelProperty("是否是午餐（1表示午餐，2表示晚餐）")
    @TableField("is_lunch")
    private Integer isLunch;

    @ApiModelProperty("备注")
    @TableField("remark")
    private String remark;

    @ApiModelProperty("订单发起时间")
    @TableField("in_start_time")
    private LocalDateTime inStartTime;

    @ApiModelProperty("订单总价格")
    @TableField("in_sum")
    private BigDecimal inSum;

    @ApiModelProperty("优惠劵id")
    @TableField("cp_id")
    private Integer cpId;



    @Override
    public Serializable pkVal() {
        return this.inId;
    }

}
